home *** CD-ROM | disk | FTP | other *** search
- #ifdef __GNUC__
- #ifdef __MSHORT__
- #include "lib.h"
-
- #ifndef CHARBITS
- # define UNSCHAR(c) ((unsigned char)(c))
- # define uchar unsigned char
- #else
- # define UNSCHAR(c) ((c)&CHARBITS)
- # define uchar char
- #endif
-
- /*
- * memcmp - compare bytes
- */
-
- int /* <0, == 0, >0 */
- lmemcmp(s1, s2, size)
- _CONST _VOIDSTAR s1;
- _CONST _VOIDSTAR s2;
- long size;
- {
- register _CONST char *scan1;
- register _CONST char *scan2;
- register long n;
-
- scan1 = s1;
- scan2 = s2;
- for (n = size; n > 0; n--)
- if (*scan1 == *scan2) {
- scan1++;
- scan2++;
- } else
- return(*scan1 - *scan2);
-
- return(0);
- }
- #endif /* __MSHORT__ */
- #endif /* __GNUC__ */
-